package com.hyt.it.ogt.pj.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hyt.core.base.BaseServiceImpl;
import com.hyt.it.ogt.pj.mapper.LogMapper;
import com.hyt.it.ogt.pj.model.entity.Log;
import com.hyt.it.ogt.pj.service.ILogService;

/**
 * <p>
 * 评卷日志表 服务实现类
 * </p>
 *
 * @author qiaozj
 * @since 2020-07-09
 */
@Service
public class LogServiceImpl extends BaseServiceImpl<LogMapper, Log> implements ILogService {

    @Autowired
    private LogMapper logMapper;

    /**
     * 获取评卷日志
     * @param projectId 评卷项目id
     * @return
     */
    @Override
    public Boolean existProjectLog(String projectId) {
        boolean flag = true;
        List<Log> logs = logMapper.existProjectLog(projectId);
        if(logs == null || logs.size() == 0){
            flag = false;
        }
        return flag;
    }
}
